<?php
// +----------------------------------------------------------------------
// | SparkERP 优秀的进销存系统 
// +----------------------------------------------------------------------
// | Copyright (c) 2022~2099 http://erp.sparkshop.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: NickBai  <1902822973@qq.com>
// +----------------------------------------------------------------------
namespace app\model\data;

use app\model\BaseModel;

class Unit extends BaseModel
{ 
    /**
     * 是否允许小数状态映射
     */
    public function getIsFloatTextAttr($value, $data)
    {
        $status = [1 => '是', 2 => '否'];
        return $status[$data['is_float']] ?? '';
    }
}